<?php

Class ShopModel extends Model {
    
    protected $_validate = array(
        array('shop_name', 'require', '商家名不能为空！'),
        array('shop_address', 'require', '商家地址不能为空！'),
        array('link_man', 'require', '联系人不能为空！'),
        array('link_phone', 'require', '联系方式不能为空！'),
    );

    public function from_uid($uid) {
        $shop = $this->where("user_id = '{$uid}'")->find();
        return $shop;
    }

}

?>
